package com.atguigu.test

import com.atguigu.source.{SensorReading, SensorSource}
import org.apache.flink.streaming.api.scala._

object CusumeFromSensorSource {

  def main(args: Array[String]): Unit = {


    val env: StreamExecutionEnvironment = StreamExecutionEnvironment.getExecutionEnvironment
    env.setParallelism(1)
    val stream: DataStream[SensorReading] = env.addSource(new SensorSource)
    val  stream2: DataStream[SensorReading] = env.addSource(new SensorSource)

    stream.map(r=>r.id).print()
//    stream.print()
    env.execute()
  }

}
